package CalendarWS;

//import javax.xml.*;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.*;
import com.google.gdata.data.calendar.*;
import com.google.gdata.data.extensions.*;
import com.google.gdata.data.DateTime;
import com.google.gdata.data.Person;
import com.google.gdata.data.PlainTextConstruct;
import com.google.gdata.model.atom.Content;
import com.google.gdata.model.gd.Transparency;

@XmlRootElement
public class EventObject {
	private String id;
	private String title;
	private String description;
	private boolean allDay;
	private DateTime startDateTime;
	private DateTime endDateTime;
	private String start;
	private String end;
	private String url;
	private String className; // css-class or array of classes 
	private boolean editable;
	// event-source-object ???
	
	public EventObject() {
		allDay=false;
		editable=true;
		startDateTime = endDateTime = new DateTime();
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public boolean isAllDay() {
		return allDay;
	}
	public void setAllDay(boolean allDay) {
		this.allDay = allDay;
	}
	public String getStart() {
		return start; // for full-calendar
	}
	public void setStart(long start, int tzoffset) {
		startDateTime.setValue(start);
		startDateTime.setTzShift(tzoffset);
		this.start = startDateTime.toString();
	}
	public String getEnd() {
		return end; // for full-calendar
	}
	public void setEnd(long end, int tzoffset) {
		endDateTime.setValue(end);
		endDateTime.setTzShift(tzoffset);
		this.end = endDateTime.toString();
		
	}
	@XmlTransient
	public DateTime getStartDateTime() {
		return startDateTime;
	}
	public void setStartDateTime(DateTime startDateTime) {
		this.startDateTime = startDateTime;
	}
	@XmlTransient
	public DateTime getEndDateTime() {
		return endDateTime;
	}
	public void setEndDateTime(DateTime endDateTime) {
		this.endDateTime = endDateTime;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getClassName() {
		return className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	public boolean isEditable() {
		return editable;
	}
	public void setEditable(boolean editable) {
		this.editable = editable;
	}
	
} // end class